#include <iostream>
#include "xtest_client.h"
#include "thread_pool/XThreadPool.h"
#include <sstream>
#include <thread>
using namespace std;
int main(int argc, char *argv[])
{
    XTestClient::RegMsgCallback();
    XTestClient* client =new XTestClient();
    client->setServerIP("127.0.0.1");
    client->setServerPort(API_GATEWAY_PORT);
    client->StartConnect();
    for (size_t i = 0; i < 20; i++)
    {
        stringstream ss;
        ss<<"/root/"<<i;
        client->GetDir(ss.str());
        std::this_thread::sleep_for(chrono::milliseconds(10));
    }
    XThreadPool::Wait();
    return 0;
}